#ifndef LIBRARY_H
#define LIBRARY_H
#include <vector>
#include <string>
using namespace std;
class Borrower
{
private:
	string bid;
	string bfirstname;
	string blastname;
	int loanbook;
public:
	Borrower() { loanbook = 0; };
	int returnloanbook() { return loanbook; }
	vector<string> loanid;
	Borrower(string &inid, string &infirstname, string &inlastname,int &inloanbook, vector<string>bookid);
	void displayborrowerdata()const;
};
class BookRecord
{
private:
	string title;
	string aufirstname;
	string aulastname;
	int year;
	int copiesnum;
	int availnum;
	string id;
public:
	BookRecord() { year = 0; copiesnum = 0; availnum = 0; };
	BookRecord(string &inid, string&intitle,string &inaufirstname, string &inaulastname, int& inyear, int& incopiesnum,int &z);
	string returnid();
	int returnavailnum();
	void getavailnum(int i);
	void displaybookdata()const;
};
class Catalogue
{
private:
	int bookloannum;
	vector<BookRecord> recordbook;
public:
	Catalogue() { bookloannum = 0; };
	void getcatadata(BookRecord& book,vector<Borrower>&togetavail);
	void displaycatadata()const;
};
class Library
{
private:
	int loanbooknum;
	int totalavail;
	int borrnum;
	Catalogue bookcatalogue;
	vector<Borrower> borr;
public:
	Library() { loanbooknum = 0; totalavail = 0; borrnum = 0; };
	void getbookdata();
	void getborrdata();
	void displaybook();
	void displayborrower();
};
#endif
